﻿<UserControl x:Class="PasswordForm" x:Name="pf1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="170" Width="400">
    <Grid>
        <StackPanel Orientation="Vertical">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
                <TextBlock Text="Welcome back" FontSize="18"  TextWrapping="Wrap" TextAlignment="Center" Margin="3"/>
                <ComboBox Margin="3" MinWidth="150" ItemsSource="{Binding ElementName=pf1, Path=Users}" x:Name="cbUser" SelectionChanged="cbUser_SelectionChanged" SelectedIndex="0"/>
                
            </StackPanel>
            
            <TextBlock x:Name="tbBadPass" Text="Incorrect password! Please try again:" TextWrapping="Wrap" TextAlignment="Center" Foreground="Red" FontSize="14"/>
            <TextBlock x:Name="tbFirstTry" Text="Please enter your password to access your profile:" TextWrapping="Wrap" TextAlignment="Center" FontSize="14"/>
            <GroupBox Header="Password" Margin="3">
                <PasswordBox x:Name="pBox" PasswordChanged="pBox_PasswordChanged" Margin="3"/>
            </GroupBox>
            
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="3">
                <Button Content="Create new profile..." Margin="3" x:Name="buttonCreateProfile" Click="buttonCreateProfile_Click" MinHeight="30" Foreground="Blue"/>
                <Button Content="Login" Margin="3" MinHeight="30" MinWidth="80" Click="ButtonOK_Click" Foreground="Green" FontWeight="Bold" IsDefault="True"/>
                <Button Content="Cancel" Margin="3" MinHeight="30" MinWidth="80" Click="ButtonCancel_Click" Foreground="Red"/>
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
